package com.bawei.user

import android.os.Bundle
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
import androidx.core.view.WindowInsetsCompat
import com.alibaba.android.arouter.facade.annotation.Route
import com.bawei.base.http.EventBus
import com.bawei.base.mvvm.BaseActivity
import com.bawei.user.databinding.ActivityLoginBinding
import com.blankj.utilcode.util.ToastUtils

@Route(path = "/user/LoginPwdActivity")
class LoginPwdActivity : BaseActivity<ActivityLoginBinding,UserViewModel>() {
    override fun getLoutyId(): Int {
        return R.layout.activity_login_pwd
    }

    override fun getViewModel(): Class<UserViewModel> {
        return UserViewModel::class.java
    }

    override fun initView() {

        //
        binding.getyzm.setOnClickListener {
            EventBus.instance.sendEvent("gogogo","点击了验证码登录控件")
        }
    }

    override fun initDate() {

        //事件总线
        EventBus.instance.getEvent< String>("gogogo").observe(this){
            ToastUtils.showLong(it)
        }
    }

}